package com.hl.springcloud.service;

import com.hl.springcloud.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@Component      // 注册到 容器
@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPT")
public interface DeptClientService {
	
	@GetMapping("/dept/get/{id}")
	public Dept queryById(@PathVariable("id") long id);
	
	@GetMapping("/dept/get/list")
	public List<Dept> queryAll();
	
	@PostMapping("/dept/add")
	public Boolean addDept(Dept dept);
}
